package com.huaxin.device.dto.enums.validation;

import com.huaxin.device.dto.enums.validator.VoltageLevelValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = VoltageLevelValidator.class)
public @interface ValidVoltageLevel {
    String message() default "无效的电压等级，允许值：220V, 380V, 10KV, 20KV, 35KV, 110KV, 220KV";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}